﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SqlOrm.Xml;
using CCodeTreeLib;

namespace SqlOrm.ADO
{
    public class ADOFactory
    {
        public static IADO GetADO(DataDictionary ddl)
        {
            IADO result = null;
            if (ddl.Settings.Database.ver == DatabaseVersion.Sql2008R2)
                return new SQLServerADO();
            if (ddl.Settings.Database.ver == DatabaseVersion.SqlCompact35)
                return new SQLCompactADO();
            return result;
        }
    }

    public interface IADO
    {
        string GetUsing();
        string GetConnectionType { get; }
        string GetTransactionType { get; }
        string GetCommandType { get; }
    }
}
